const express = require("express");
const router = express.Router();
const userController = require("../controllers/userController");
const expressJoi = require("@escook/express-joi");
// 这里注意导出的方式对应相对应的引入方式
const { userCheck } = require("../utils/check");
// 用户注册
router.post(
  "/register",
  expressJoi(userCheck),
  userController.registerController
);

// 用户登录
router.post("/login", expressJoi(userCheck), userController.loginController);

// 用户信息查询接口
router.get('/userInfo', userController.userInfoController);
module.exports = router;
